package com.freemyleft.left.zapp.selectimage.bean;

import java.io.Serializable;

/**
 * 图片实体
 * Created by Nereo on 2015/4/7.
 */
public class Image implements Serializable {
    public String path;//图片本地地址
    public String name;//图片名称
    public long time;//图片的创建时间
    public boolean isSelect;//是否被选中
    public int height;//图片分辨率高度
    public int width;//图片分辨率宽度

    public Image(String path, String name, long time, int width, int hight){
        this.path = path;
        this.name = name;
        this.time = time;
        this.height = hight;
        this.width = width;
        isSelect = false;
    }

    @Override
    public boolean equals(Object o) {
        try {
            Image other = (Image) o;
            return this.path.equalsIgnoreCase(other.path);
        }catch (ClassCastException e){
            e.printStackTrace();
        }
        return super.equals(o);
    }
}
